import axios from '@/libs/request'

export const create = () => {
  return axios.request({
    url: '/wl/create',
    type: 'get',
    php: true
  })
}
// 数据导入
export const saveRecordpl = (data) => {
  return axios.request({
    url: '/api/as/dangan/record/saveRecordpl',
    data: data,
    type: 'post'
  })
}

/**
 * 获取列表
 * @param data
 * @returns {*}
 */
export const recordList = (data) => {
  return axios.request({
    url: '/api/as/dangan/record/getRecordList',
    data: data,
    type: 'post'
  })
}

/**
 * 新增接口
 * @param data
 * @returns {*}
 */
export const saveAndUpdateUser = (data) => {
  return axios.request({
    url: '/api/as/dangan/record/saveUser',
    data: data,
    type: 'post'
  })
}

export const getRecordById = (id) => {
  return axios.request({
    url: '/api/as/dangan/record/getRecordById ',
    data: { id: id },
    type: 'post'
  })
}
/**
 * 档案转送
 * @param data
 * @returns {*}
 */
export const recordConnection = (data) => {
  return axios.request({
    url: '/api/ac/dangan/recordConnectionService/recordConnection ',
    data: data,
    type: 'post'
  })
}
/**
 * 档案转送列表
 * @param data
 * @returns {*}
 */
export const getRecordConnectionList = (data) => {
  return axios.request({
    url: '/api/as/dangan/record/getRecordConnectionList',
    data: data,
    type: 'post'
  })
}
/**
 * 分配流水号
 * @param data
 * @returns {*}
 */
export const updateSerialNum = (data) => {
  return axios.request({
    url: '/api/ac/dangan/recordConnectionService/updateSerialNum',
    data: data,
    type: 'post'
  })
}
/**
 *  接收档案
 * @param data
 * @returns {*}
 */
export const updateRecordState = (data) => {
  return axios.request({
    url: '/api/ac/dangan/recordConnectionService/updateRecordState',
    data: data,
    type: 'post'
  })
}
export const getRecordZSList = (data) => {
  return axios.request({
    url: '/api/as/dangan/record/getRecordZSList',
    data: data,
    type: 'post'
  })
}
/**
 * 档案列表数量统计
 * @param data
 * @returns {*}
 */
export const getRecordNum = (data) => {
  return axios.request({
    url: '/api/as/dangan/record/getRecordNum',
    data: data,
    type: 'post'
  })
}
/**
 * 档案接收数量统计
 * @param data
 * @returns {*}
 */
export const getRecordJSNum = (data) => {
  return axios.request({
    url: '/api/as/dangan/record/getRecordJSNum',
    data: data,
    type: 'post'
  })
}
/**
 * 获取接收机构
 * @param data
 * @returns {*}
 */
export const getOfficeList = (data) => {
  return axios.request({
    url: '/api/as/dangan/record/getOfficeList',
    data: data,
    type: 'post'
  })
}
